package com.ruoyi.rsikManage.service;



import com.ruoyi.rsikManage.domain.AlarmEvent;
import com.ruoyi.rsikManage.domain.PlaceCategory;
import com.ruoyi.rsikManage.domain.TAlarms;
import com.ruoyi.rsikManage.domain.vo.AlarmOfEachDayVo;
import com.ruoyi.rsikManage.domain.vo.AlarmOfEachLevelVo;
import com.ruoyi.rsikManage.domain.vo.HistogramVo;
import com.ruoyi.rsikManage.domain.vo.RealTimeAlarmCountVo;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * 报警信息Service接口
 *
 * @author ruoyi
 * @date 2023-08-08
 */
public interface ITAlarmsService
{

    int countUnhandledAiAlarmInProvinceFileForToday(String placeCategoryDicVal);
    int countHandlingAiAlarmInProvinceFileForToday(String placeCategoryDicVal);
    int countHandledAiAlarmInProvinceFileForToday(String placeCategoryDicVal);
    int countAllAiAlarmInProvinceFileForToday(String placeCategoryDicVal);
    int insertGroundAlarmSituationOfCurrent(int unhandledAlarmCount, int handledAlarmCount, int alarmCount);
    int insertUndergroundKeyPositionsAlarmSituationOfCurrent(int unhandledAlarmCount, int handledAlarmCount, int alarmCount);
    int insertKeyMinesUndergroundAlarmSituationOfCurrent(int unhandledAlarmCount, int handledAlarmCount, int alarmCount);
    List<AlarmEvent> selectAlarmEventList(AlarmEvent alarmEvent);
    int markAlarmEventAsSent(List<AlarmEvent> alarmEvents);
    /**
     * 统计某标准文件下的各个场所类别中的:各场所的报警总数、算法总数
     */
    List<PlaceCategory> countPlaceCategoryList(String provinceFileDicVal, Date startTime, Date endTime);


    List<HistogramVo> countAlgoAlarmForEachType(Date startTime, Date endTime);

    List<HistogramVo> countAlgoAlarmForEachMonth(String alarmName);

    List<HistogramVo> countAlgoAlarmForEachMonthForUnitCodes(LocalDateTime startTime, LocalDateTime endTime,String alarmName,List<Long> unitCodes);

    List<HistogramVo> countOfflineForEachMonitor(Date startTime, Date endTime);

    List<HistogramVo> countOfflineForEachMonitorForUnitCodes(LocalDateTime startTime, LocalDateTime endTime,List<Long> unitCodes);


    List<HistogramVo> countOfflineForEachMonth();

    List<HistogramVo> countOfflineForEachMonthForUnitCodes(LocalDateTime startTime, LocalDateTime endTime,List<Long> unitCodes );

    List<HistogramVo> countDiagnosisAbnorForEachMonitor(Date startTime, Date endTime);

    List<HistogramVo> countDiagnosisAbnorForEachMonitorForUnitCodes(LocalDateTime startTime, LocalDateTime endTime,List<Long> unitCodes);


    List<HistogramVo> countDiagnosisAlarmForEachMonth(Date startTime, Date endTime);

    List<HistogramVo> countDiagnosisAlarmForEachMonthForUnitCodes(LocalDateTime startTime, LocalDateTime endTime,List<Long> unitCodes);


    List<HistogramVo> countAlarmLevel();

    List<Map<String,Object>> countAlarmType(Date startTime, Date endTime);

    List<Map<String,Object>> countAlarmTypeForUnitCodes(LocalDateTime startTime, LocalDateTime endTime,List<Long> unitCodes);


    List<PlaceCategory> countAlarmOfCategoryAndPlace(Date startTime, Date endTime);

    List<PlaceCategory> countAlarmOfCategoryAndPlaceForUnitCodes(LocalDateTime startTime, LocalDateTime endTime,List<Long> unitCodes);


    List<PlaceCategory> countAlgoOfCategory();

    List<AlarmOfEachDayVo> countAlarmOfEachDay(Date startTime, Date endTime, String alarmName);

    List<AlarmOfEachDayVo> countAlarmOfEachDayForUnitCodes(LocalDateTime startTime, LocalDateTime endTime, String alarmName,List<Long> unitCodes);


    List<AlarmOfEachLevelVo> countAlarmOfEachLevel(Date startTime, Date endTime);
    //List<HistogramVo> countOfflineForEachMonitor2(Date startTime, Date endTime);

    //List<HistogramVo> countDiagnosisAbnorForEachMonitor2(Date startTime, Date endTime);

//
//    String selectTheURLWhereTheAlarmInfoIsSentTo();
//
//
//    int setTheURLWhereTheAlarmInfoIsSentTo(String url);
//
//    List<RealTimeAlarmCountVo> selectGroundAlarmSituation();
//
//    List<RealTimeAlarmCountVo> selectUndergroundKeyPositionsAlarmSituation();
//
//    List<RealTimeAlarmCountVo> selectKeyMinesUndergroundAlarmSituation();
//    public TAlarms selectTAlarmsById(Long idId);
//
//
//    public List<TAlarms> selectTAlarmsList(TAlarms tAlarms);
//
//    public int insertTAlarms(TAlarms tAlarms);
//
//
//    public int updateTAlarms(TAlarms tAlarms);
//
//
//    public int deleteTAlarmsByIds(Long[] idIds);
//
//    public int deleteTAlarmsById(Long idId);
//    List<HashMap<String, Object>> countAiAlarmForEachDay(Long placeId, String alarmType);
//    List<HashMap<String, Object>> countAiAlarmForEachMonth(Long placeId, String alarmType);
//    List<HashMap<String, Object>> countAiAlarmForEachYear(Long placeId, String alarmType);
//    int countAiAlarmInPlaceOverAPeriodOfTime(Long placeId, String alarmType, Date startTime, Date endTime);
}
